<?php
/**
 * Conversations - A lightweight BB for Xaraya
 *
 * @package modules
 * @copyright (C) 2003-2006 The Digital Development Foundation.
 * @license GPL {@link http://www.gnu.org/licenses/gpl.html}
 * @link http://www.xaraya.com
 *
 * @subpackage conversations
 * @link http://xaraya.com/index.php/release/760.html
 * @author John Cox
 * @author jojodee
*/
function conversations_user_modifyconfig()
{
    if(!xarSecurityCheck('AdminxarBB')) return;

    $data = array();
    $consettings = xarModGetVar('conversations', 'settings');
    if (!empty($consettings)) {
        $settings = unserialize($consettings);
    }
    
    $data['threshlow']  = !isset($settings['threshlow']) ? 100 :$settings['threshlow'];
    $data['threshmed']  = !isset($settings['threshmed']) ? 200 :$settings['threshmed'];
    $data['threshtop']  = !isset($settings['threshtop']) ? 500 :$settings['threshtop'];
    $data['fresh']      = !isset($settings['fresh']) ? 60*60*2 :$settings['fresh'];
    $data['initial']    = !isset($settings['initial']) ? 60*60*24*14 :$settings['initial'];
    //$hooks              = xarModCallHooks('module', 'modifyconfig', 'conversations', 
    //                        array('module' => 'conversations')
    //);
    //if (empty($hooks)) {
    //    $data['hooks'] = '';
    //} elseif (is_array($hooks)) {
    //    $data['hooks'] = join('',$hooks);
    //} else {
    //    $data['hooks'] = $hooks;
    //}
    $data['settings']        = $settings;
    return $data;
}
?>